"""
@Project:Python crawler
@File:计算时间.py
@Author:邓建祥
@Date:19:34
"""
import time
from datetime import datetime

start_time_hour = 13
start_time_minute = 50
now_time_hour = datetime.now().hour
now_time_minute = datetime.now().minute
#距离开始时间过去多少分钟
times = (now_time_hour-start_time_hour)*60+now_time_minute-start_time_minute
if times%55<45:
    #该第几节课
    count = times//55+1
    #还有几分钟下课
    minute = 55*count-times-10
    start_hour = start_time_hour+(count-1)*55//60
    start_minute = start_time_minute+(count-1)*55%60
    end_hour = start_time_hour+((count-1)*55+45)//60
    end_minute = start_time_minute+((count-1)*55+45)%60
    if start_minute>=60:
        start_hour+=1
        start_minute-=60
    if end_minute>=60:
        end_hour+=1
        end_minute-=60
    print("第"+str(count)+"节课，","还有"+str(minute)+"分钟下课")
    print(str(start_hour)+":"+str(start_minute)+"--"+str(end_hour)+":"+str(end_minute))
else:
    #第几节课下课时间
    count = times//55+1
    #还有几分钟上课
    minute = 55-times%55

    start_hour = start_time_hour+((count-1)*55+45)//60
    start_minute = start_time_minute+((count-1)*55+45)%60
    end_hour = start_time_hour+(count*55)//60
    end_minute = start_time_minute+(count*55)%60
    if start_minute>=60:
        start_hour+=1
        start_minute-=60
    if end_minute>=60:
        end_hour+=1
        end_minute-=60
    print("第"+str(count)+"节课休息时间，","还有"+str(minute)+"分钟上课")
    print(str(start_hour)+":"+str(start_minute)+"--"+str(end_hour)+":"+str(end_minute))